<?php 

include './Core/function.php';


if($_POST){

	$res = $_POST;

	foreach ($res as $key => $value) {
		if($value==''){
			error('index.php','用户或者留言不能为空');
		}
	}

	$db = include './db.php';

	$db[]=$res;

	$str = var_export($db,True);
	$str = "<?php 
	return  ". $str ." 
	?>";
	file_put_contents('./db.php', $str);
	success('index.php','留言成功');
}else{
	error('index.php','非法提交');
}



 ?>